using DevExpress.Utils;
using DevExpress.XtraBars;
using Common.Class;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Common.Base
{
	public class XucToolBarD : XucBase
	{
		private IContainer components = null;
		private Bar BarM;
		private BarDockControl barDockControlTop;
		private BarDockControl barDockControlBottom;
		private BarDockControl barDockControlLeft;
		private BarDockControl barDockControlRight;
		public ImageCollection img;
		public BarButtonItem bbiClose;
		public BarButtonItem bbiOption;
		public BarButtonItem bbiHelp;
		public BarButtonItem bbiExport;
		public BarButtonItem bbiImport;
		public BarButtonItem bbiPrint;
		public PopupMenu pm;
		public BarManager bm;
		public BarButtonItem bbiCopy;
		public BarButtonItem bbiProductDetail;
		public BarButtonItem bbiHistory;
		public BarButtonItem bbiInventory;
		public BarSubItem bbiProduct;
		private BarButtonItem bbiView;
		public BarButtonItem bbiDelete;
		public BarButtonItem bbiDeleteAll;
		public event ButtonClickEventHander ExportClick;
		public event ButtonClickEventHander AddClick;
		public event ButtonClickEventHander EditClick;
		public event ButtonClickEventHander ChangeClick;
		public event ButtonClickEventHander DeleteClick;
		public event ButtonClickEventHander DeleteAllClick;
		public event ButtonClickEventHander RefreshClick;
		public event ButtonClickEventHander PrintClick;
		public event ButtonClickEventHander CloseClick;
		public event ButtonClickEventHander OptionClick;
		public event ButtonClickEventHander SaveClick;
		public event ButtonClickEventHander CancleClick;
		public event ButtonClickEventHander SaveNewClick;
		public event ButtonClickEventHander SearchClick;
		public event ButtonClickEventHander HelpClick;
		public event ButtonClickEventHander ImportClick;
		public event ButtonClickEventHander PermisionClick;
		public event ButtonClickEventHander ConstructClick;
		public event ButtonClickEventHander CopyClick;
		public event ButtonClickEventHander MirrorClick;
		public event ButtonClickEventHander ClearClick;
		public event ButtonClickEventHander ProductDetailClick;
		public event ButtonClickEventHander HistoryClick;
		public event ButtonClickEventHander InventoryClick;
		public event ButtonClickEventHander SaveDataTempClick;
		public event ButtonClickEventHander RestoreDataTempClick;
		public event ButtonClickEventHander SaveDataToFileClick;
		public event ButtonClickEventHander ReadDataFromFileClick;
		public event ButtonClickEventHander SaveLayoutClick;
		public event ButtonClickEventHander ReadLayoutClick;
		public event ButtonClickEventHander SelectAllClick;
		public event ButtonClickEventHander SaveDataByIdClick;
		public event ButtonClickEventHander ReadDataByIdClick;
		public event ButtonClickEventHander ViewClick;
		[Category("Design"), DefaultValue(false), Description("Button Print")]
		public BarItemVisibility ButtonPrint
		{
			get
			{
				return this.bbiPrint.Visibility;
			}
			set
			{
				this.bbiPrint.Visibility = value;
				base.Update();
			}
		}
		[Category("Design"), DefaultValue(false), Description("Button Delete")]
		public BarItemVisibility ButtonOption
		{
			get
			{
				return this.bbiOption.Visibility;
			}
			set
			{
				this.bbiOption.Visibility = value;
				base.Update();
			}
		}
		[Category("Design"), DefaultValue(false), Description("Button Delete")]
		public BarItemVisibility ButtonExport
		{
			get
			{
				return this.bbiExport.Visibility;
			}
			set
			{
				this.bbiExport.Visibility = value;
				base.Update();
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			SuperToolTip superToolTip = new SuperToolTip();
			ToolTipItem toolTipItem = new ToolTipItem();
			SuperToolTip superToolTip2 = new SuperToolTip();
			ToolTipItem toolTipItem2 = new ToolTipItem();
			SuperToolTip superToolTip3 = new SuperToolTip();
			ToolTipItem toolTipItem3 = new ToolTipItem();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(XucToolBarD));
			SuperToolTip superToolTip4 = new SuperToolTip();
			ToolTipItem toolTipItem4 = new ToolTipItem();
			this.bm = new BarManager();
			this.BarM = new Bar();
			this.bbiView = new BarButtonItem();
			this.bbiExport = new BarButtonItem();
			this.bbiPrint = new BarButtonItem();
			this.bbiHelp = new BarButtonItem();
			this.bbiClose = new BarButtonItem();
			this.barDockControlTop = new BarDockControl();
			this.barDockControlBottom = new BarDockControl();
			this.barDockControlLeft = new BarDockControl();
			this.barDockControlRight = new BarDockControl();
			this.img = new ImageCollection();
			this.bbiOption = new BarButtonItem();
			this.bbiImport = new BarButtonItem();
			this.bbiCopy = new BarButtonItem();
			this.bbiProductDetail = new BarButtonItem();
			this.bbiHistory = new BarButtonItem();
			this.bbiInventory = new BarButtonItem();
			this.bbiProduct = new BarSubItem();
			this.bbiDelete = new BarButtonItem();
			this.bbiDeleteAll = new BarButtonItem();
			this.pm = new PopupMenu();
			((ISupportInitialize)this.bm).BeginInit();
			((ISupportInitialize)this.img).BeginInit();
			((ISupportInitialize)this.pm).BeginInit();
			base.SuspendLayout();
			this.bm.AllowCustomization = false;
			this.bm.AllowMoveBarOnToolbar = false;
			this.bm.AllowQuickCustomization = false;
			this.bm.AllowShowToolbarsPopup = false;
			this.bm.AutoSaveInRegistry = true;
			this.bm.Bars.AddRange(new Bar[]
			{
				this.BarM
			});
			this.bm.DockControls.Add(this.barDockControlTop);
			this.bm.DockControls.Add(this.barDockControlBottom);
			this.bm.DockControls.Add(this.barDockControlLeft);
			this.bm.DockControls.Add(this.barDockControlRight);
			this.bm.DockWindowTabFont = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.bm.Form = this;
			this.bm.Images = this.img;
			this.bm.Items.AddRange(new BarItem[]
			{
				this.bbiClose,
				this.bbiOption,
				this.bbiHelp,
				this.bbiExport,
				this.bbiImport,
				this.bbiCopy,
				this.bbiPrint,
				this.bbiProductDetail,
				this.bbiHistory,
				this.bbiInventory,
				this.bbiProduct,
				this.bbiView,
				this.bbiDelete,
				this.bbiDeleteAll
			});
			this.bm.LargeImages = this.img;
			this.bm.MainMenu = this.BarM;
			this.bm.MaxItemId = 68;
			this.bm.ShowFullMenusAfterDelay = false;
			this.BarM.BarName = "Main menu";
			this.BarM.DockCol = 0;
			this.BarM.DockRow = 0;
			this.BarM.DockStyle = BarDockStyle.Top;
			this.BarM.FloatLocation = new Point(83, 126);
			this.BarM.LinksPersistInfo.AddRange(new LinkPersistInfo[]
			{
				new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiView, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph),
				new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiExport, BarItemPaintStyle.CaptionGlyph),
				new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiPrint, BarItemPaintStyle.CaptionGlyph),
				new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiHelp, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph),
				new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiClose, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph)
			});
			this.BarM.OptionsBar.AllowQuickCustomization = false;
			this.BarM.OptionsBar.DrawDragBorder = false;
			this.BarM.OptionsBar.RotateWhenVertical = false;
			this.BarM.OptionsBar.UseWholeRow = true;
			this.BarM.Text = "Main menu";
			this.bbiView.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
			this.bbiView.Appearance.Options.UseFont = true;
			this.bbiView.Caption = "Xem";
			this.bbiView.Id = 65;
			this.bbiView.ImageIndex = 46;
			this.bbiView.ItemShortcut = new BarShortcut(Keys.F5, Keys.LButton | Keys.MButton | Keys.Back | Keys.Control);
			this.bbiView.Name = "bbiView";
			this.bbiView.ItemClick += new ItemClickEventHandler(this.BbiViewItemClick);
			this.bbiExport.Caption = "Xuất ";
			this.bbiExport.Id = 19;
			this.bbiExport.ImageIndex = 26;
			this.bbiExport.ItemShortcut = new BarShortcut((Keys)131141);
			this.bbiExport.LargeImageIndex = 26;
			this.bbiExport.Name = "bbiExport";
			toolTipItem.Text = "Ctrl+E";
			superToolTip.Items.Add(toolTipItem);
			this.bbiExport.SuperTip = superToolTip;
			this.bbiExport.ItemClick += new ItemClickEventHandler(this.BbiExportItemClick);
			this.bbiPrint.ButtonStyle = BarButtonStyle.DropDown;
			this.bbiPrint.Caption = "In";
			this.bbiPrint.Id = 44;
			this.bbiPrint.ImageIndex = 9;
			this.bbiPrint.ItemShortcut = new BarShortcut((Keys)131152);
			this.bbiPrint.Name = "bbiPrint";
			this.bbiPrint.ItemClick += new ItemClickEventHandler(this.BbiPrintItemClick);
			this.bbiHelp.Caption = "Trợ giúp";
			this.bbiHelp.Id = 18;
			this.bbiHelp.ImageIndex = 25;
			this.bbiHelp.ItemShortcut = new BarShortcut(Keys.F1, (Keys)131144);
			this.bbiHelp.Name = "bbiHelp";
			toolTipItem2.Text = "F1";
			superToolTip2.Items.Add(toolTipItem2);
			this.bbiHelp.SuperTip = superToolTip2;
			this.bbiHelp.Visibility = BarItemVisibility.Never;
			this.bbiHelp.ItemClick += new ItemClickEventHandler(this.BbiHelpItemClick);
			this.bbiClose.Caption = "&Đóng";
			this.bbiClose.Id = 6;
			this.bbiClose.ImageIndex = 22;
			this.bbiClose.ItemShortcut = new BarShortcut(Keys.F10);
			this.bbiClose.Name = "bbiClose";
			toolTipItem3.Text = "F10";
			superToolTip3.Items.Add(toolTipItem3);
			this.bbiClose.SuperTip = superToolTip3;
			this.bbiClose.ItemClick += new ItemClickEventHandler(this.BbiCloseItemClick);
			this.img.ImageStream = (ImageCollectionStreamer)componentResourceManager.GetObject("img.ImageStream");
			this.img.Images.SetKeyName(45, "RibbonPrintPreview_SaveLarge.png");
			this.img.Images.SetKeyName(46, "RibbonPrintPreview_ZoomLarge.png");
			this.img.Images.SetKeyName(47, "CONTROL PANEL2123213.png");
			this.img.Images.SetKeyName(48, "RibbonPrintPreview_CustomizeLarge.png");
			this.img.Images.SetKeyName(49, "RibbonPrintPreview_DocumentMapLarge.png");
			this.img.Images.SetKeyName(50, "RibbonPrintPreview_FindLarge.png");
			this.bbiOption.Caption = "Lựa chọn";
			this.bbiOption.Id = 15;
			this.bbiOption.ImageIndex = 60;
			this.bbiOption.ItemShortcut = new BarShortcut((Keys)131151);
			this.bbiOption.LargeImageIndex = 60;
			this.bbiOption.Name = "bbiOption";
			toolTipItem4.Text = "Ctrl+O";
			superToolTip4.Items.Add(toolTipItem4);
			this.bbiOption.SuperTip = superToolTip4;
			this.bbiOption.Visibility = BarItemVisibility.Never;
			this.bbiOption.ItemClick += new ItemClickEventHandler(this.BbiOptionItemClick);
			this.bbiImport.Caption = "Nhập";
			this.bbiImport.Id = 30;
			this.bbiImport.ImageIndex = 55;
			this.bbiImport.ItemShortcut = new BarShortcut((Keys)131145);
			this.bbiImport.LargeImageIndexDisabled = 53;
			this.bbiImport.Name = "bbiImport";
			this.bbiImport.Visibility = BarItemVisibility.Never;
			this.bbiImport.ItemClick += new ItemClickEventHandler(this.BbiImportItemClick);
			this.bbiCopy.Caption = "Chép vào ClipBoard";
			this.bbiCopy.Id = 42;
			this.bbiCopy.ImageIndex = 1;
			this.bbiCopy.ItemShortcut = new BarShortcut((Keys)196675);
			this.bbiCopy.Name = "bbiCopy";
			this.bbiCopy.ItemClick += new ItemClickEventHandler(this.BbiCopyItemClick);
			this.bbiProductDetail.Caption = "Chi Tiết";
			this.bbiProductDetail.Id = 48;
			this.bbiProductDetail.ItemShortcut = new BarShortcut((Keys)196688);
			this.bbiProductDetail.Name = "bbiProductDetail";
			this.bbiProductDetail.ItemClick += new ItemClickEventHandler(this.BbiProductDetailItemClick);
			this.bbiHistory.Caption = "Lịch Sử";
			this.bbiHistory.Id = 49;
			this.bbiHistory.ItemShortcut = new BarShortcut((Keys)196680);
			this.bbiHistory.Name = "bbiHistory";
			this.bbiHistory.ItemClick += new ItemClickEventHandler(this.BbiHistoryItemClick);
			this.bbiInventory.Caption = "Xem tồn kho";
			this.bbiInventory.Id = 51;
			this.bbiInventory.ItemShortcut = new BarShortcut((Keys)131145);
			this.bbiInventory.Name = "bbiInventory";
			this.bbiInventory.ItemClick += new ItemClickEventHandler(this.BbiInventoryItemClick);
			this.bbiProduct.Caption = "Hàng Hoá";
			this.bbiProduct.Id = 62;
			this.bbiProduct.ImageIndex = 24;
			this.bbiProduct.LinksPersistInfo.AddRange(new LinkPersistInfo[]
			{
				new LinkPersistInfo(this.bbiProductDetail),
				new LinkPersistInfo(this.bbiHistory),
				new LinkPersistInfo(this.bbiInventory)
			});
			this.bbiProduct.Name = "bbiProduct";
			this.bbiDelete.Caption = "Xoá";
			this.bbiDelete.Id = 66;
			this.bbiDelete.ImageIndex = 13;
			this.bbiDelete.Name = "bbiDelete";
			this.bbiDelete.Visibility = BarItemVisibility.Never;
			this.bbiDelete.ItemClick += new ItemClickEventHandler(this.BbiDeleteItemClick);
			this.bbiDeleteAll.Caption = "Xoá nhiều";
			this.bbiDeleteAll.Id = 67;
			this.bbiDeleteAll.ImageIndex = 13;
			this.bbiDeleteAll.Name = "bbiDeleteAll";
			this.bbiDeleteAll.Visibility = BarItemVisibility.Never;
			this.bbiDeleteAll.ItemClick += new ItemClickEventHandler(this.BbiDeleteAllItemClick);
			this.pm.LinksPersistInfo.AddRange(new LinkPersistInfo[]
			{
				new LinkPersistInfo(this.bbiView),
				new LinkPersistInfo(this.bbiCopy),
				new LinkPersistInfo(this.bbiDelete),
				new LinkPersistInfo(this.bbiDeleteAll),
				new LinkPersistInfo(this.bbiExport),
				new LinkPersistInfo(this.bbiPrint),
				new LinkPersistInfo(this.bbiProduct, true),
				new LinkPersistInfo(this.bbiHelp, true),
				new LinkPersistInfo(this.bbiClose, true)
			});
			this.pm.Manager = this.bm;
			this.pm.Name = "pm";
			base.Controls.Add(this.barDockControlLeft);
			base.Controls.Add(this.barDockControlRight);
			base.Controls.Add(this.barDockControlBottom);
			base.Controls.Add(this.barDockControlTop);
			base.Name = "XucToolBarD";
			base.Size = new Size(424, 26);
			((ISupportInitialize)this.bm).EndInit();
			((ISupportInitialize)this.img).EndInit();
			((ISupportInitialize)this.pm).EndInit();
			base.ResumeLayout(false);
		}
		public XucToolBarD()
		{
			this.InitializeComponent();
		}
		public void InvokeDeleteAllClick()
		{
			ButtonClickEventHander deleteAllClick = this.DeleteAllClick;
			if (deleteAllClick != null)
			{
				deleteAllClick(this);
			}
		}
		private void RaiseViewClickEventHander()
		{
			if (this.ViewClick != null)
			{
				this.ViewClick(this);
			}
		}
		private void RaiseInventoryClickEventHander()
		{
			if (this.InventoryClick != null)
			{
				this.InventoryClick(this);
			}
		}
		private void RaiseHistoryClickEventHander()
		{
			if (this.HistoryClick != null)
			{
				this.HistoryClick(this);
			}
		}
		private void RaiseProductDetailClickEventHander()
		{
			if (this.ProductDetailClick != null)
			{
				this.ProductDetailClick(this);
			}
		}
		private void RaiseCopyClickEventHander()
		{
			if (this.CopyClick != null)
			{
				this.CopyClick(this);
			}
		}
		private void RaiseImportClickEventHander()
		{
			if (this.ImportClick != null)
			{
				this.ImportClick(this);
			}
		}
		private void RaiseHelpClickEventHander()
		{
			if (this.HelpClick != null)
			{
				this.HelpClick(this);
			}
		}
		private void RaiseOptionClickEventHander()
		{
			if (this.OptionClick != null)
			{
				this.OptionClick(this);
			}
		}
		private void RaiseDeleteClickEventHander()
		{
			if (this.DeleteClick != null)
			{
				this.DeleteClick(this);
			}
		}
		private void RaisePrintClickEventHander()
		{
			if (this.PrintClick != null)
			{
				this.PrintClick(this);
			}
		}
		private void RaiseCloseClickEventHander()
		{
			if (this.CloseClick != null)
			{
				this.CloseClick(this);
			}
		}
		private void RaiseExportEventHander()
		{
			if (this.ExportClick != null)
			{
				this.ExportClick(this);
			}
		}
		private void BbiPrintItemClick(object sender, ItemClickEventArgs e)
		{
			this.bbiPrint.Enabled = false;
			this.RaisePrintClickEventHander();
			this.bbiPrint.Enabled = true;
		}
		private void BbiCloseItemClick(object sender, ItemClickEventArgs e)
		{
			this.RaiseCloseClickEventHander();
		}
		private void BbiOptionItemClick(object sender, ItemClickEventArgs e)
		{
			this.RaiseOptionClickEventHander();
		}
		private void BbiExportItemClick(object sender, ItemClickEventArgs e)
		{
			this.bbiExport.Enabled = false;
			this.RaiseExportEventHander();
			this.bbiExport.Enabled = true;
		}
		private void BbiHelpItemClick(object sender, ItemClickEventArgs e)
		{
			this.RaiseHelpClickEventHander();
		}
		private void BbiImportItemClick(object sender, ItemClickEventArgs e)
		{
			this.RaiseImportClickEventHander();
		}
		private void BbiCopyItemClick(object sender, ItemClickEventArgs e)
		{
			this.RaiseCopyClickEventHander();
		}
		private void BbiProductDetailItemClick(object sender, ItemClickEventArgs e)
		{
			this.RaiseProductDetailClickEventHander();
		}
		private void BbiHistoryItemClick(object sender, ItemClickEventArgs e)
		{
			this.RaiseHistoryClickEventHander();
		}
		private void BbiInventoryItemClick(object sender, ItemClickEventArgs e)
		{
			this.RaiseInventoryClickEventHander();
		}
		private void BbiViewItemClick(object sender, ItemClickEventArgs e)
		{
			this.bbiView.Enabled = false;
			this.RaiseViewClickEventHander();
			this.bbiView.Enabled = true;
		}
		private void BbiDeleteItemClick(object sender, ItemClickEventArgs e)
		{
			this.RaiseDeleteClickEventHander();
		}
		private void BbiDeleteAllItemClick(object sender, ItemClickEventArgs e)
		{
			this.InvokeDeleteAllClick();
		}
	}
}
